package com.oa.common.utils;

public class Hexadecimal {

	public static String ToHexadecimal(String dataArrays) {
		if(dataArrays.equals("10")){
			dataArrays = "0A";
		}else if(dataArrays.equals("11")){
			dataArrays = "0B";
		}else if(dataArrays.equals("12")){
			dataArrays = "0C";
		}else if(dataArrays.equals("13")){
			dataArrays = "0D";
		}else if(dataArrays.equals("14")){
			dataArrays = "0E";
		}else if(dataArrays.equals("15")){
			dataArrays = "0F";
		}else if(dataArrays.equals("16")){
			dataArrays = "10";
		}else if(dataArrays.equals("17")){
			dataArrays = "11";
		}else if(dataArrays.equals("18")){
			dataArrays = "12";
		}else if(dataArrays.equals("19")){
			dataArrays = "13";
		}else if(dataArrays.equals("20")){
			dataArrays = "14";
		}else if(dataArrays.equals("21")){
			dataArrays = "15";
		}else if(dataArrays.equals("22")){
			dataArrays = "16";
		}else if(dataArrays.equals("23")){
			dataArrays = "17";
		}else if(dataArrays.equals("24")){
			dataArrays = "18";
		}else if(dataArrays.equals("25")){
			dataArrays = "19";
		}else if(dataArrays.equals("26")){
			dataArrays = "1A";
		}else if(dataArrays.equals("27")){
			dataArrays = "1B";
		}else if(dataArrays.equals("28")){
			dataArrays = "1C";
		}else if(dataArrays.equals("29")){
			dataArrays = "1D";
		}else if(dataArrays.equals("30")){
			dataArrays = "1E";
		}else if(dataArrays.equals("31")){
			dataArrays = "1F";
		}else if(dataArrays.equals("32")){
			dataArrays = "20";
		}else if(dataArrays.equals("33")){
			dataArrays = "21";
		}else if(dataArrays.equals("34")){
			dataArrays = "22";
		}else if(dataArrays.equals("35")){
			dataArrays = "23";
		}else if(dataArrays.equals("36")){
			dataArrays = "24";
		}else if(dataArrays.equals("37")){
			dataArrays = "25";
		}else if(dataArrays.equals("38")){
			dataArrays = "26";
		}else if(dataArrays.equals("39")){
			dataArrays = "27";
		}else if(dataArrays.equals("40")){
			dataArrays = "28";
		}else if(dataArrays.equals("41")){
			dataArrays = "29";
		}else if(dataArrays.equals("42")){
			dataArrays = "2A";
		}else if(dataArrays.equals("43")){
			dataArrays = "2B";
		}else if(dataArrays.equals("44")){
			dataArrays = "2C";
		}else if(dataArrays.equals("45")){
			dataArrays = "2D";
		}else if(dataArrays.equals("46")){
			dataArrays = "2E";
		}else if(dataArrays.equals("47")){
			dataArrays = "2F";
		}else if(dataArrays.equals("48")){
			dataArrays = "30";
		}else if(dataArrays.equals("49")){
			dataArrays = "31";
		}else if(dataArrays.equals("50")){
			dataArrays = "32";
		}else if(dataArrays.equals("51")){
			dataArrays = "33";
		}else if(dataArrays.equals("52")){
			dataArrays = "34";
		}else if(dataArrays.equals("53")){
			dataArrays = "35";
		}else if(dataArrays.equals("54")){
			dataArrays = "36";
		}else if(dataArrays.equals("55")){
			dataArrays = "37";
		}else if(dataArrays.equals("56")){
			dataArrays = "38";
		}else if(dataArrays.equals("57")){
			dataArrays = "39";
		}else if(dataArrays.equals("58")){
			dataArrays = "3A";
		}else if(dataArrays.equals("59")){
			dataArrays = "3B";
		}
		return dataArrays.toString().toUpperCase();
	}
	
	
	
	public static String TimeToHexadecimal(String dataArrays) {
		if(dataArrays.equals("00")){
			dataArrays = "01";
		}else if(dataArrays.equals("01")){
			dataArrays = "02";
		}else if(dataArrays.equals("02")){
			dataArrays = "03";
		}else if(dataArrays.equals("03")){
			dataArrays = "04";
		}else if(dataArrays.equals("04")){
			dataArrays = "05";
		}else if(dataArrays.equals("05")){
			dataArrays = "06";
		}else if(dataArrays.equals("06")){
			dataArrays = "07";
		}else if(dataArrays.equals("07")){
			dataArrays = "08";
		}else if(dataArrays.equals("08")){
			dataArrays = "09";
		}else if(dataArrays.equals("09")){
			dataArrays = "0A";
		}else if(dataArrays.equals("10")){
			dataArrays = "0B";
		}else if(dataArrays.equals("11")){
			dataArrays = "0C";
		}else if(dataArrays.equals("12")){
			dataArrays = "0D";
		}else if(dataArrays.equals("13")){
			dataArrays = "0E";
		}else if(dataArrays.equals("14")){
			dataArrays = "0F";
		}else if(dataArrays.equals("15")){
			dataArrays = "10";
		}else if(dataArrays.equals("16")){
			dataArrays = "11";
		}else if(dataArrays.equals("17")){
			dataArrays = "12";
		}else if(dataArrays.equals("18")){
			dataArrays = "13";
		}else if(dataArrays.equals("19")){
			dataArrays = "14";
		}else if(dataArrays.equals("20")){
			dataArrays = "15";
		}else if(dataArrays.equals("21")){
			dataArrays = "16";
		}else if(dataArrays.equals("22")){
			dataArrays = "17";
		}else if(dataArrays.equals("23")){
			dataArrays = "18";
		}else if(dataArrays.equals("24")){
			dataArrays = "19";
		}else if(dataArrays.equals("25")){
			dataArrays = "1A";
		}else if(dataArrays.equals("26")){
			dataArrays = "1B";
		}else if(dataArrays.equals("27")){
			dataArrays = "1C";
		}else if(dataArrays.equals("28")){
			dataArrays = "1D";
		}else if(dataArrays.equals("29")){
			dataArrays = "1E";
		}else if(dataArrays.equals("30")){
			dataArrays = "1F";
		}else if(dataArrays.equals("31")){
			dataArrays = "20";
		}else if(dataArrays.equals("32")){
			dataArrays = "21";
		}else if(dataArrays.equals("33")){
			dataArrays = "22";
		}else if(dataArrays.equals("34")){
			dataArrays = "23";
		}else if(dataArrays.equals("35")){
			dataArrays = "24";
		}else if(dataArrays.equals("36")){
			dataArrays = "25";
		}else if(dataArrays.equals("37")){
			dataArrays = "26";
		}else if(dataArrays.equals("38")){
			dataArrays = "27";
		}else if(dataArrays.equals("39")){
			dataArrays = "28";
		}else if(dataArrays.equals("40")){
			dataArrays = "29";
		}else if(dataArrays.equals("41")){
			dataArrays = "2A";
		}else if(dataArrays.equals("42")){
			dataArrays = "2B";
		}else if(dataArrays.equals("43")){
			dataArrays = "2C";
		}else if(dataArrays.equals("44")){
			dataArrays = "2D";
		}else if(dataArrays.equals("45")){
			dataArrays = "2E";
		}else if(dataArrays.equals("46")){
			dataArrays = "2F";
		}else if(dataArrays.equals("47")){
			dataArrays = "30";
		}else if(dataArrays.equals("48")){
			dataArrays = "31";
		}else if(dataArrays.equals("49")){
			dataArrays = "32";
		}else if(dataArrays.equals("50")){
			dataArrays = "33";
		}else if(dataArrays.equals("51")){
			dataArrays = "34";
		}else if(dataArrays.equals("52")){
			dataArrays = "35";
		}else if(dataArrays.equals("53")){
			dataArrays = "36";
		}else if(dataArrays.equals("54")){
			dataArrays = "37";
		}else if(dataArrays.equals("55")){
			dataArrays = "38";
		}else if(dataArrays.equals("56")){
			dataArrays = "39";
		}else if(dataArrays.equals("57")){
			dataArrays = "3A";
		}else if(dataArrays.equals("58")){
			dataArrays = "3B";
		}else if(dataArrays.equals("59")){
			dataArrays = "3C";
		}
		return dataArrays.toString().toUpperCase();
	}
}
